class ResponsesController < ApplicationController
  def create
      @event = Event.find(params[:event_id])
      @response = @event.responses.create(params[:response])
      redirect_to event_path(@event)
  end
  
  # DELETE /responses/1
  # DELETE /responses/1.json
  def destroy
    @response = Response.find(params[:id])
    @response.destroy

    respond_to do |format|
      format.html { redirect_to events_url }
      format.json { head :no_content }
    end
  end
  
end
